#ifndef GAME_H
#define GAME_H
//------------------------------------------------------------------------
#include "Defines.h"
#include "Window.h"
#include "Renderer.h"
#include "Structs.h"
#include "Triangle.h"
#include "Button.h"
#include "Cuadrado.h"
#include "Scene.h"
#include "Importer.h"
#include "Sprites.h"
#include "Timer.h"
#include "DirectInput.h"
//------------------------------------------------------------------------
class ENGINE_API Game
{
public:
	Game(HINSTANCE hInstance);
	virtual ~Game();
	
	// engine functions
	bool StartUp();
	bool Loop();
	bool ShutDown();
	Importer * GetImporter(){return m_Imp;}

	bool addSceneToUpdate(Scene* pkScene);
	bool removeSceneToUpdate(Scene* pkScene);
	bool addSceneToDraw(Scene* pkScene);
	bool removeSceneToDraw(Scene* pkScene);
	
	void SetTileMap(TileMap* map);
	void DrawTileMap();

private:
	// virtual functions
	virtual bool OnStart()=0;
	virtual bool OnLoop()=0;
	virtual bool OnShutDown()=0;
	

public:
	Importer* m_Imp;
	Renderer* m_pRender;
	Window* m_pWindow;
	HINSTANCE m_hInstance;
	DirectInput * m_dxin;
	Timer *time;


	//------------------------------------
	std::map< std::string, Scene* > m_SceneMapD;
	std::map< std::string, Scene* > m_SceneMapU;
	std::map< std::string, Scene* >::iterator m_SceneMapIt;
	std::vector<TileMap*> m_pkCurrentMap;
	//------------------------------------
};
#endif GAME_H